package com.xiaohudie.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.flogger.Flogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Data

@Component(value = "st")
public class Student {
    @Value("root")
    private String name;
    private Integer age;
    private Integer id;
    /**验证ioc使用无惨构造在执行的*/
        public Student(){
            System.out.println("使用无参构造");
        }
    public Student(String name, Integer age, Integer id) {
        this.name = name;
        this.age = age +10;
        this.id = id;
        System.out.println("使用有参构造");
    }

    public Student(String name, Integer age) {
        System.out.println("使用第二个有参构造");
        this.name = name;
        this.age = age;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


}
